package com.sun.showcase.client.basic.domain;

import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

import com.sun.showcase.utils.DateUtils;
public class UserInfo  implements java.io.Serializable{
	private static final long serialVersionUID = 5454155825314635342L;
	
	public static final String TABLE_ALIAS = "UserInfo";
	
    /**
     * ID主键       db_column: ID 
     */	
	private java.lang.String id;
    /**
     * 账号       db_column: NAME 
     */	
	private java.lang.String name;
    /**
     * 密码       db_column: PASSWORD 
     */	
	private java.lang.String password;
    /**
     * 昵称       db_column: NICK_NAME 
     */	
	private java.lang.String nickName;
    /**
     * 邮箱       db_column: EMAIL 
     */	
	private java.lang.String email;
    /**
     * 电话       db_column: PHONE 
     */	
	private java.lang.String phone;
    /**
     * 利农卡号       db_column: LN_CARD_NUM 
     */	
	private java.lang.String lnCardNum;
    /**
     * 身份证号       db_column: ID_NUM 
     */	
	private java.lang.String idNum;
    /**
     * 用户类型（0：系统用户 1：店铺管理员 2：店铺员工）       db_column: USER_TYPE 
     */	
	private java.lang.String userType;
    /**
     * 用户所属店铺ID       db_column: USER_SHOP_ID 
     */	
	private java.lang.Long userShopId;
    /**
     * 用户所属店铺名称       db_column: USER_SHOP_NAME 
     */	
	private java.lang.String userShopName;
    /**
     * 区域编码       db_column: OPERATION_AREA_CODE 
     */	
	private java.lang.String operationAreaCode;
    /**
     * 区域名称       db_column: OPERATION_AREA_NAME 
     */	
	private java.lang.String operationAreaName;
	/**
	 * 截取区域长度
	 */
	private Integer levelLength;
    /**
     * 机构名称       db_column: INSTITUTION_NAME 
     */	
	private java.lang.String institutionName;
    /**
     * 省名称       db_column: PROVINCE_NAME 
     */	
	private java.lang.String provinceName;
    /**
     * 省编码       db_column: PROVINCE_CODE 
     */	
	private java.lang.String provinceCode;
    /**
     * 市名称       db_column: CITY_NAME 
     */	
	private java.lang.String cityName;
    /**
     * 市编码       db_column: CITY_CODE 
     */	
	private java.lang.String cityCode;
    /**
     * 县名称       db_column: COUNTY_NAME 
     */	
	private java.lang.String countyName;
    /**
     * 县编码       db_column: COUNTY_CODE 
     */	
	private java.lang.String countyCode;
    /**
     * 镇名称       db_column: TOWN_NAME 
     */	
	private java.lang.String townName;
    /**
     * 镇编码       db_column: TOWN_CODE 
     */	
	private java.lang.String townCode;
    /**
     * 村名称       db_column: VILLAGE_NAME 
     */	
	private java.lang.String villageName;
    /**
     * 村编码       db_column: VILLAGE_CODE 
     */	
	private java.lang.String villageCode;
    /**
     * 账户状态1:启用;0:禁用;       db_column: STATUS 
     */	
	private java.lang.String status;
    /**
     * 最后一次登录IP       db_column: LAST_LOGIN_IP 
     */	
	private java.lang.String lastLoginIp;
    /**
     * 最后一次登录时间       db_column: LAST_LOGIN_TIME 
     */	
	private java.util.Date lastLoginTime;
    /**
     * 密码修改时间       db_column: PASSWORD_EXPIRE_TIME 
     */	
	private java.util.Date passwordExpireTime;
    /**
     * sessionID       db_column: SESSION_ID 
     */	
	private java.lang.String sessionId;
	/**
	 * 是否有进销存（默认 0：是 1：否）
	 */
	private String ifSsm;
    /**
     * 有效状态（1：有效 0：无效）       db_column: ACTIVE_FLAG 
     */	
	private java.lang.String activeFlag;
    /**
     * 创建人ID       db_column: CREATE_BY 
     */	
	private java.lang.String createBy;
    /**
     * 创建人姓名       db_column: CREATE_BY_NAME 
     */	
	private java.lang.String createByName;
    /**
     * 创建时间       db_column: CREATE_DATE 
     */	
	private java.util.Date createDate;
    /**
     * 修改人ID       db_column: MODIFIED_BY 
     */	
	private java.lang.String modifiedBy;
    /**
     * 修改人姓名       db_column: MODIFIED_BY_NAME 
     */	
	private java.lang.String modifiedByName;
    /**
     * 修改时间       db_column: MODIFIED_DATE 
     */	
	private java.util.Date modifiedDate;
	//columns END

	public UserInfo(){
	}

	public UserInfo(java.lang.String id){
		this.id = id;
	}

	public java.lang.String getId() {
		return id;
	}

	public void setId(java.lang.String id) {
		this.id = id;
	}

	public void setName(java.lang.String value) {
		this.name = value;
	}
	
	public java.lang.String getName() {
		return this.name;
	}
	public void setPassword(java.lang.String value) {
		this.password = value;
	}
	
	public java.lang.String getPassword() {
		return this.password;
	}
	public void setNickName(java.lang.String value) {
		this.nickName = value;
	}
	
	public java.lang.String getNickName() {
		return this.nickName;
	}
	public void setEmail(java.lang.String value) {
		this.email = value;
	}
	
	public java.lang.String getEmail() {
		return this.email;
	}
	public void setPhone(java.lang.String value) {
		this.phone = value;
	}
	
	public java.lang.String getPhone() {
		return this.phone;
	}
	public void setLnCardNum(java.lang.String value) {
		this.lnCardNum = value;
	}
	
	public java.lang.String getLnCardNum() {
		return this.lnCardNum;
	}
	public void setIdNum(java.lang.String value) {
		this.idNum = value;
	}
	
	public java.lang.String getIdNum() {
		return this.idNum;
	}
	public void setUserType(java.lang.String value) {
		this.userType = value;
	}
	
	public java.lang.String getUserType() {
		return this.userType;
	}
	public void setUserShopId(java.lang.Long value) {
		this.userShopId = value;
	}
	
	public java.lang.Long getUserShopId() {
		return this.userShopId;
	}
	public void setUserShopName(java.lang.String value) {
		this.userShopName = value;
	}
	
	public java.lang.String getUserShopName() {
		return this.userShopName;
	}
	public void setOperationAreaCode(java.lang.String value) {
		this.operationAreaCode = value;
	}
	
	public java.lang.String getOperationAreaCode() {
		return this.operationAreaCode;
	}
	public void setOperationAreaName(java.lang.String value) {
		this.operationAreaName = value;
	}
	
	public java.lang.String getOperationAreaName() {
		return this.operationAreaName;
	}
	public void setInstitutionName(java.lang.String value) {
		this.institutionName = value;
	}
	
	public java.lang.String getInstitutionName() {
		return this.institutionName;
	}
	public void setProvinceName(java.lang.String value) {
		this.provinceName = value;
	}
	
	public java.lang.String getProvinceName() {
		return this.provinceName;
	}
	public void setProvinceCode(java.lang.String value) {
		this.provinceCode = value;
	}
	
	public java.lang.String getProvinceCode() {
		return this.provinceCode;
	}
	public void setCityName(java.lang.String value) {
		this.cityName = value;
	}
	
	public java.lang.String getCityName() {
		return this.cityName;
	}
	public void setCityCode(java.lang.String value) {
		this.cityCode = value;
	}
	
	public java.lang.String getCityCode() {
		return this.cityCode;
	}
	public void setCountyName(java.lang.String value) {
		this.countyName = value;
	}
	
	public java.lang.String getCountyName() {
		return this.countyName;
	}
	public void setCountyCode(java.lang.String value) {
		this.countyCode = value;
	}
	
	public java.lang.String getCountyCode() {
		return this.countyCode;
	}
	public void setTownName(java.lang.String value) {
		this.townName = value;
	}
	
	public java.lang.String getTownName() {
		return this.townName;
	}
	public void setTownCode(java.lang.String value) {
		this.townCode = value;
	}
	
	public java.lang.String getTownCode() {
		return this.townCode;
	}
	public void setVillageName(java.lang.String value) {
		this.villageName = value;
	}
	
	public java.lang.String getVillageName() {
		return this.villageName;
	}
	public void setVillageCode(java.lang.String value) {
		this.villageCode = value;
	}
	
	public java.lang.String getVillageCode() {
		return this.villageCode;
	}
	public void setStatus(java.lang.String value) {
		this.status = value;
	}
	
	public java.lang.String getStatus() {
		return this.status;
	}
	public void setLastLoginIp(java.lang.String value) {
		this.lastLoginIp = value;
	}
	
	public java.lang.String getLastLoginIp() {
		return this.lastLoginIp;
	}
	public String getLastLoginTimeString() {
		//return DateConvertUtils.format(getLastLoginTime(), FORMAT_LAST_LOGIN_TIME);
		return  DateUtils.format(DateUtils.format2,getLastLoginTime());
	}
	public void setLastLoginTimeString(String value) {
		setLastLoginTime(DateUtils.parse(value,DateUtils.format2,java.util.Date.class));
	}
	
	public void setLastLoginTime(java.util.Date value) {
		this.lastLoginTime = value;
	}
	
	public java.util.Date getLastLoginTime() {
		return this.lastLoginTime;
	}
	public String getPasswordExpireTimeString() {
		//return DateConvertUtils.format(getPasswordExpireTime(), FORMAT_PASSWORD_EXPIRE_TIME);
		return  DateUtils.format(DateUtils.format2,getPasswordExpireTime());
	}
	public void setPasswordExpireTimeString(String value) {
		setPasswordExpireTime(DateUtils.parse(value,DateUtils.format2,java.util.Date.class));
	}
	
	public void setPasswordExpireTime(java.util.Date value) {
		this.passwordExpireTime = value;
	}
	
	public java.util.Date getPasswordExpireTime() {
		return this.passwordExpireTime;
	}
	public void setSessionId(java.lang.String value) {
		this.sessionId = value;
	}
	
	public java.lang.String getSessionId() {
		return this.sessionId;
	}
	public void setActiveFlag(java.lang.String value) {
		this.activeFlag = value;
	}
	
	public java.lang.String getActiveFlag() {
		return this.activeFlag;
	}
	public void setCreateBy(java.lang.String value) {
		this.createBy = value;
	}
	
	public java.lang.String getCreateBy() {
		return this.createBy;
	}
	public void setCreateByName(java.lang.String value) {
		this.createByName = value;
	}
	
	public java.lang.String getCreateByName() {
		return this.createByName;
	}
	public String getCreateDateString() {
		//return DateConvertUtils.format(getCreateDate(), FORMAT_CREATE_DATE);
		return  DateUtils.format(DateUtils.format2,getCreateDate());
	}
	public void setCreateDateString(String value) {
		setCreateDate(DateUtils.parse(value,DateUtils.format2,java.util.Date.class));
	}
	
	public void setCreateDate(java.util.Date value) {
		this.createDate = value;
	}
	
	public java.util.Date getCreateDate() {
		return this.createDate;
	}
	public void setModifiedBy(java.lang.String value) {
		this.modifiedBy = value;
	}
	
	public java.lang.String getModifiedBy() {
		return this.modifiedBy;
	}
	public void setModifiedByName(java.lang.String value) {
		this.modifiedByName = value;
	}
	
	public java.lang.String getModifiedByName() {
		return this.modifiedByName;
	}
	public String getModifiedDateString() {
		//return DateConvertUtils.format(getModifiedDate(), FORMAT_MODIFIED_DATE);
		return  DateUtils.format(DateUtils.format2,getModifiedDate());
	}
	public void setModifiedDateString(String value) {
		setModifiedDate(DateUtils.parse(value,DateUtils.format2,java.util.Date.class));
	}
	
	public void setModifiedDate(java.util.Date value) {
		this.modifiedDate = value;
	}
	
	public java.util.Date getModifiedDate() {
		return this.modifiedDate;
	}

	public Integer getLevelLength() {
		return levelLength;
	}

	public void setLevelLength(Integer levelLength) {
		this.levelLength = levelLength;
	}

	public String getIfSsm() {
		return ifSsm;
	}

	public void setIfSsm(String ifSsm) {
		this.ifSsm = ifSsm;
	}

	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof UserInfo == false) return false;
		if(this == obj) return true;
		UserInfo other = (UserInfo)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

